//
// Created by 123 on 2025/1/7.
//
#include "string"
#include "iostream"
using namespace std;

void test(){
    string s1 = "hello";
    string s2 = "aello";
    int ret = s1.compare(s2);
    if(ret==0){
        cout << "s1=s2" << endl;
    }
    if(ret>0){
        cout << "s1>s2" << endl;
    }
    if(ret<0){
        cout << "s1<==>s2" << endl;
    }

    string str = "hello world";
    for (int i = 0; i < str.size(); i++) {
        cout << str[i] << "";
        cout << str.at(i) << " ";
    }
    cout << endl;

    str[0] = 'M';
    str.at(1) = 'X';
    cout << str << endl;


}

int main116(){
    test();

    return 0;
}